package service

import (
	"context"
	"micro-grpc-server/library/upload"
	"micro-grpc-server/library/upload/aliyun"
	"micro-grpc-server/services/attachment/internal/conf"
	"micro-grpc-server/services/attachment/internal/dao"
	pb "micro-grpc-server/services/attachment/proto"
)

type AttachmentService struct {
	conf   *conf.Config
	dao    *dao.Dao
	client upload.Upload
}

func NewService(config *conf.Config) (s *AttachmentService) {
	s = &AttachmentService{
		conf:   config,
		dao:    dao.NewDao(config),
		client: aliyun.NewClient(&config.Aliyun),
	}
	return
}

// 搜索歌曲
func (s *AttachmentService) Upload(ctx context.Context, rq *pb.UploadRequest, resp *pb.UploadResponse) (err error) {
	return nil
}
